1 //========================================================================
2 // File Name : SMovieTheater.cpp
3 // Author : Michael Diep
4 // Copyright : Copyright(C). Michael Diep
2016
5 // Brought To You By: code-projects.org
6 // Description : This program creates a movie theater inventory system.
7 // By making an
object class "Movie", we are able to control
8 // the
private variables such as movie name, ticket available, and
9 // ticket price
for each movie. Our other class "MovieTicketMaster"
10 //
is the class that will generate the menu and the search functions
11 //
for the user (the user interface).
12 //
13 //
14 // Date Version Student ID Author
15 //
04-19-16 1.0 20163437 Michael Diep
16 //=========================================================================

17
18 #include <iostream>
19 #include <
string>
20 using
namespace std;
21
22 class
Movie
23 {

24 private
:
25     
string movie_name;
26     
int tickets_available;
27     
double ticket_price;
28 public
:
29     Movie();
30     Movie(
string my_movie_name, int my_tickets_available, double my_ticket_price);
31     ~Movie();
32
33     
string get_movie_name();
34     
int get_tickets_available();
35     
double get_ticket_price();
36     
void set_movie_name(string new_movie_name);
37     
void set_tickets_available(int new_tickets_available);
38     
void set_ticket_price(double new_ticket_price);
39
40     
double PurchaseTicket(int new_tickets_available);
41     
void Display();
42 };

43
44
45 class
MovieTicketMaster
46 {

47 private
:
48     Movie * p_MovieList;
49     
string theater_name;
50     
string theater_location;
51 public
:
52     MovieTicketMaster();
53     MovieTicketMaster(
string my_theater_name, string my_theater_location);
54     ~MovieTicketMaster();
55     
void Init(Movie * p_my_MovieList, int array_size);
56     
void Run();
57     
void DisplayMenu();
58     
void ViewMovies();
59     Movie * SearchMovie();
60     Movie * FindMovie(
string find_movie_name);
61     
void PurchaseTicket();
62 };


Gõ tìm kiếm nhanh...